chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
	if (request.type == "launch") {
		chrome.runtime.sendNativeMessage("com.koimy.w001",
			{ message: request.message }, (response) => {
				if (chrome.runtime.lastError) {
					console.log("error " + chrome.runtime.lastError.message);
				} else {
					console.log("Received " + JSON.stringify(response));
					// 发送回页面
					sendResponse(response);
				}
			});
	}
	return true;
});
